export default {
  data() {
    return {
      chart: null
    }
  },
  methods: {
    initialize() {
      this.chart = this.$echarts.init(this.$refs.chart)
    }
  },
  beforeDestroy() {
    if (this.chart) {
      this.chart.dispose()
      this.chart = null
    }
  }
}
